      SUBROUTINE SETUP
      RETURN
      END
C   HS40
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS40'/
      DATA (X(I),I=1,4)/4*.80D0/
      DATA N/4/ , NH/3/ , NG/ 0/
      DATA DEL0/1.00D0/ ,TAU0/1.00D0/ ,TAU/.1D0/
      DATA ((GUNIT(I,J),I=1,3),J=0,3)/-1,0,0,-1,0,0,-1,0,0,-1,0,0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=-X(1)*X(2)*X(3)*X(4)
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)=-X(2)*X(3)*X(4)
      GRADF(2)=-X(1)*X(3)*X(4)
      GRADF(3)=-X(1)*X(2)*X(4)
      GRADF(4)=-X(1)*X(2)*X(3)
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      GOTO (100,200,300),I
  100 CONTINUE
      HXI=X(1)**3+X(2)**2-1.D0
      RETURN
  200 CONTINUE
      HXI=X(1)**2*X(4)-X(3)
      RETURN
  300 CONTINUE
      HXI=X(4)**2     -X(2)
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I,K
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      DO      10      K=1,4
      GRADHI(K)=0.D0
   10 CONTINUE
      GOTO (100,200,300),I
  100 CONTINUE
      GRADHI(1)=3.D0*X(1)**2
      GRADHI(2)=2.D0*X(2)
      RETURN
  200 CONTINUE
      GRADHI(1)=2.D0*X(1)*X(4)
      GRADHI(3)=-1.D0
      GRADHI(4)=X(1)**2
      RETURN
  300 CONTINUE
      GRADHI(2)=-1.D0
      GRADHI(4)=2.D0*X(4)
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GXI
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      RETURN
      END

